<template>
	<view>
		<view class="padd_20">
			<up-search placeholder="搜索地址" v-model="keyword" @change="init" :show-action="false" shape="shape"
				action-text="搜索" :animation="true"></up-search>
		</view>
		<view>
			<view class="marg" v-for="(item,index) in list" :key="index">
				<view>{{item.category}}</view>
				<view class="font_size_28 marg_top_20 clr_h">{{item.address}}</view>
			</view>
		</view>
		<empty title="自制力"></empty>
	</view>
</template>

<script lang="ts" setup>
	import { onMounted, ref } from 'vue'
	import { sean } from '@/utils/map_sdk.js'
	const keyword = ref('')//搜索
	const page = ref(1)//搜索
	const list = ref([])//搜索


	onMounted(() => {

	})

	const init = () => {
		list.value = []
		uni.getLocation({
			type: 'wgs84',
			success: function (res) {
				sean(res.latitude, res.longitude, keyword.value, page.value).then(res => {
					if (res.code == 1) {
						console.log(res.data)
						list.value = list.value.concat(res.data)
					}
				})
			}
		});

	}
</script>

<style>

</style>